#ifndef IMPORT_PROCESS_WINDOW_H
#define IMPORT_PROCESS_WINDOW_H

#include <QWidget>
#include <QProgressBar>
#include <QLabel>
#include <QVBoxLayout>
#include <QString>
#include "ImportThread.h"

class ImportProcessWindow : public QWidget
{
Q_OBJECT
public:
    ImportProcessWindow(QString zipPath, QWidget *parent = nullptr);
    ~ImportProcessWindow() override;
private:
    QProgressBar* progressBar = nullptr;
    QLabel* label = nullptr;
    QVBoxLayout* mainLayout = nullptr;
    ImportThread* workThread = nullptr;

signals:
    void finished();

protected:
    void closeEvent(QCloseEvent *event) override;

private slots:
    void handle(ImportHandleStatus status, int process, QString text);
    void cleanAndClose();
};

#endif//IMPORT_PROCESS_WINDOW_H
